<template>
  <div>
    <div v-show="!showLocationDetail && !showSurveyDetail && !showDesignDetail">
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>门店建设基础信息</span>
        </div>
        <el-form :model="formData" size="mini" label-width="120px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店建设项目号:" prop="constCode">
                <span>{{ formData.constCode }}</span>
              </el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店建设整体进度:" prop="constSchedule">{{ formaterData(constScheduleList, formData.constSchedule) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="所属阶段:" prop="belongStage">{{ formaterData(belongStageList, formData.belongStage) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店建设是否完结:" prop="isEnd">{{ booleansFormatter(formData.isEnd) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店建设状态:" prop="constState">{{ formaterData(constStateList, formData.constState) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="测绘情况:" prop="surveyIsFinishMapping">{{ formaterData(isFinishMappingList, formData.surveyIsFinishMapping) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店编码:" prop="shopCode">{{ formData.shopCode }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店名称:" prop="shopName">{{ formData.shopName }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店营业状态:" prop="businessStatus">{{ formaterData(businessStatusList, formData.businessStatus) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="所属客户编码:" prop="clientCode">{{ formData.clientCode }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="所属客户名称:" prop="clientName">{{ formData.clientName }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="所属办事处:" prop="officeName">{{ formData.officeName }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="经销商姓名:" prop="customerName">{{ formData.customerName }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="经销商电话:" prop="customerPhone">{{ formData.customerPhone }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店经营面积:" prop="shopArea">{{ formData.shopArea }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店类型:" prop="shopType">{{ formaterData(shopTypeList, formData.shopType) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店业务类型:" prop="shopBizType">{{ formaterArr(bizTypeList, formData.shopBizType) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店城市级别:" prop="shopCityLevel">{{ formaterData(cityLevelList, formData.shopCityLevel) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店市场层级:" prop="shopMarketLevel">{{ formaterData(marketLevelList, formData.shopMarketLevel) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店详细地址:" prop="shopAddress">{{ formData.shopAddress }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="报图类型:" prop="marketType">{{ formaterData(marketTypeList, formData.marketType) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店建设类型:" prop="constType">{{ formaterData(constTypeList, formData.constType) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="商家类别:" prop="bizmanType">{{ formaterData(bizmanTypeList, formData.bizmanType) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="装修形式:" prop="decorationForm">{{ formaterArr(decorationFormList, formData.decorationForm) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="装修范围:" prop="decorationRange">{{ formaterArr(decorationRangeList, formData.decorationRange) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="终止时间:" prop="endTime">{{ formData.endTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="数据来源:" prop="modifName">{{ formaterData(dataFormList, formData.dataSource) }}</el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>市场交接信息</span>
        </div>
        <el-form :model="formData" size="mini" label-width="120px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="是否交接市场:" prop="isHandover">{{ booleansFormatter(formData.isHandover) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="交接前门店:" prop="beforeShopName">{{ formData.beforeShopName }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="交接前门店建设整体进度:" prop="beforeConstSchedule" label-width="160px">{{ formaterData(constScheduleList, formData.beforeConstSchedule) }}</el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="市场交接说明:" prop="handoverDesc">{{ formData.handoverDesc }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="市场交接时间:" prop="handoverTime">{{ formData.handoverTime }}</el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div v-if="formData.dataSource === 'A'" class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>选址评估数据</span>
          <span class="spancla" style="font-weight:400;font-size:12px;color:#3DC094;margin-left:20px;cursor: pointer;" @click="toLocationApply">查看选址评估详情</span>
        </div>
        <el-form :model="formData" size="mini" label-width="120px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="选址评估申请时间:" prop="locationApplyTime">{{ formData.locationApplyTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店建设类型:" prop="constType">{{ formaterData(constTypeList, formData.locationMarketSubdType) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="商家类别:" prop="bizmanType">{{ formaterData(bizmanTypeList, formData.locationBusinessType) }}</el-form-item>
            </el-col>

          </el-row>
        </el-form>
      </div>
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>测绘数据</span>
          <span class="spancla" style="font-weight:400;font-size:12px;color:#3DC094;margin-left:20px;cursor: pointer;" @click="toSurveyDetail">查看测绘列表</span>
        </div>
        <el-form :model="formData" size="mini" label-width="120px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="预计测绘申请时间:" prop="surveyExpectSurveyTime">{{ formData.surveyExpectSurveyTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="测绘申请是否超时:" prop="isOuttimeUnsurvel">{{ booleansFormatter(formData.isOuttimeUnsurvel) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="实际测绘申请时间:" prop="surveyActualSurveyTime">{{ formData.surveyActualSurveyTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店测绘是否完成:" prop="surveyIsFinishMapping">{{ booleansFormatter(formData.surveyIsFinishMapping) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店测绘进度:" prop="surveyState">{{ formaterData(surveyStateList, formData.surveyState) }}</el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>设计数据</span>
          <span class="spancla" style="font-weight:400;font-size:12px;color:#3DC094;margin-left:20px;cursor: pointer;" @click="toDesignDetail">查看设计详情</span>
        </div>
        <el-form :model="formData" size="mini" label-width="120px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="预计设计申请时间:" prop="designExpectApplyTime">{{ formData.designExpectApplyTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="设计申请是否延期:" prop="designIsApplyDelay">{{ booleansFormatter(formData.designIsApplyDelay) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="实际设计申请时间:" prop="designReportApplyTime	">{{ formData.designReportApplyTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店设计是否完成:" prop="modifName">{{ booleansFormatter(formData.isDesignEnd) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="门店设计整体进度:" prop="designState">{{ formaterData(designStateList, formData.designState) }}</el-form-item>
            </el-col>
          <!-- <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
            <el-form-item label="门店设计状态:" prop="modifName">{{ formData.xxx }}</el-form-item>
          </el-col> -->
          </el-row>
        </el-form>
      </div>
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>装修数据</span>
        </div>
        <el-form :model="formData" size="mini" label-width="190px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="当前是否有装修任务正在进行:" prop="modifName">{{ booleansFormatter(formData.haveDecorationTask) }}</el-form-item>
            </el-col>
          </el-row>
          <el-table
            :data="formData.shopDecorationConstDtos"
            style="width: 100%;margin-bottom: 20px;"
            header-row-class-name="table-list-header"
            highlight-current-row
            border
          >
            <el-table-column type="index" label="序号" width="50" />
            <el-table-column label="装修任务号" prop="decorationTaskCode" min-width="100" show-overflow-tooltip />
            <el-table-column label="装修性质" prop="nature" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterArr(decorationNatureList, scope.row.nature) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修范围" prop="range" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterArr(decorationRangeList, scope.row.range) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修进度" prop="schedule" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(decorationSchedule, scope.row.schedule) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修步骤" prop="steps" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(decorationStepsList, scope.row.steps) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修状态" prop="state" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(decorationStateList, scope.row.state) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修申请预计提报时间" prop="expectApplyReportTime" min-width="150" show-overflow-tooltip />
            <el-table-column label="装修申请是否超期" prop="isApplyReportOutTime" min-width="120" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ booleansFormatter(scope.row.isApplyReportOutTime) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修申请是否超期" prop="isApplyReportOutTime" min-width="120" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ booleansFormatter(scope.row.isApplyReportOutTime) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="整改是否超期" prop="isRectifyOutTime" min-width="120" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ booleansFormatter(scope.row.isRectifyOutTime) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="施工单位" prop="constUnitName" show-overflow-tooltip />
            <el-table-column label="施工负责人" prop="principal" min-width="100" show-overflow-tooltip />
            <el-table-column label="工程监理" prop="proSupervisorName" show-overflow-tooltip />
            <el-table-column label="数据来源" prop="dataFrom" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(dataFormList1, scope.row.dataFrom) }}</span>
              </template>
            </el-table-column>
          </el-table>
        </el-form>
      </div>
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>软装陈列数据</span>
          <c-abnormal-preview text="查看软装陈列记录" path="/softDecorate" :query="{ constCode: formData.constCode }" />
          <!-- <span class="spancla" style="color:#169BD5;margin-left:20px;cursor: pointer;" @click="toSoftwearList">查看软装陈列记录</span> -->
        </div>
        <el-form :model="formData" size="mini" label-width="200px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="当前是否有软装陈列任务正在进行:" prop="modifName">{{ booleansFormatter(formData.haveSoftwearTask) }}</el-form-item>
            </el-col>
          </el-row>
          <el-table
            :data="formData.shopSoftwearConstDtos"
            style="width: 100%;margin-bottom: 20px;"
            header-row-class-name="table-list-header"
            highlight-current-row
            border
          >
            <el-table-column type="index" label="序号" width="50" />
            <el-table-column label="软装陈列任务号" prop="softwearTaskCode" min-width="100" show-overflow-tooltip />
            <el-table-column label="装修范围" prop="decorationRange" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterArr(decorationRangeList, scope.row.decorationRange) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="软装陈列进度" prop="schedule" min-width="100" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(displayScheduleList, scope.row.schedule) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="软装陈列步骤" prop="steps" min-width="100" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(dispalyStepsList, scope.row.steps) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="软装状态" prop="state" show-overflow-tooltip>
              <template slot-scope="scope">
                <span>{{ formaterData(decorationStateList, scope.row.state) }}</span>
              </template>
            </el-table-column>
            <el-table-column label="装修任务号" prop="decorationTaskCode" min-width="100" show-overflow-tooltip />
            <el-table-column label="形象督导" prop="formSupervisorName" show-overflow-tooltip />
            <el-table-column label="软装陈列开始时间" prop="displayStartTime" min-width="120" show-overflow-tooltip />
          </el-table>
        </el-form>
      </div>
      <div class="mt20">
        <div class="qup-title-box">
          <span class="border" /><span>开业数据</span>
          <c-abnormal-preview text="查看开业记录" path="/openManage" :query="{ constCode: formData.constCode }" />
          <!-- <span class="spancla" style="color:#169BD5;margin-left:20px;cursor: pointer;" @click="toOpenList">查看开业记录</span> -->
        </div>
        <el-form :model="formData" size="mini" label-width="120px">
          <el-row class="form_item_height">
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="预计开业时间:" prop="expectOpenTime">{{ formData.expectOpenTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="开业进度:" prop="openSchedule">{{ formaterData(openScheduleList, formData.openSchedule) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="是否超时未开业:" prop="isOuttimeUnopen">{{ booleansFormatter(formData.isOuttimeUnopen) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="是否有开业申请:" prop="haveOpenApply">{{ booleansFormatter(formData.haveOpenApply) }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="实际开业时间:" prop="actualOpenTime">{{ formData.actualOpenTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="首次开业结束时间:" prop="actualOpenEndTime">{{ formData.actualOpenEndTime }}</el-form-item>
            </el-col>
            <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
              <el-form-item label="开业申请实例号:" prop="openApplySampleNo">{{ formData.openApplySampleNo }}</el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
    </div>
    <div>
      <location-detail v-if="showLocationDetail" :children-id="locationId" flag="shopConfig" :page-show.sync="showLocationDetail" @goBack="backDetail" />
      <design-detail v-if="showDesignDetail" :id="designId" page-flag="shopConfig" :page-show.sync="showDesignDetail" @goBack="backDetail" />
      <survey-detail v-if="showSurveyDetail" :children-id="surveyId" page-flag="shopConfig" :page-show.sync="showSurveyDetail" @goBack="backDetail" />
    </div>
  </div>
</template>

<script>
import { queryDetailData } from '@/api/storeConstruction'
import { getDictByPatchType } from '@/api/dataDict'
import LocationDetail from '../../../storeAddEva/detail.vue'
import DesignDetail from '../../../ShopDesign/DesignInformationDetails.vue'
import SurveyDetail from '../../../storeMapping/components/detail'
// import { openPage } from '@/utils/index'
export default {
  name: 'DeatilForm',
  components: { LocationDetail, DesignDetail, SurveyDetail },
  props: {
    detailData: {
      type: [String, Object],
      default: ''
    }
  },
  data() {
    return {
      showLocationDetail: false,
      locationId: '',
      showSurveyDetail: false,
      surveyId: '',
      showDesignDetail: false,
      designId: '',
      formData: {},
      constScheduleList: [],
      belongStageList: [],
      constStateList: [],
      constTypeList: [],
      shopTypeList: [],
      bizTypeList: [],
      cityLevelList: [],
      marketLevelList: [],
      marketTypeList: [],
      bizmanTypeList: [],
      decorationFormList: [],
      decorationRangeList: [],
      dataFormList: [],
      dataFormList1: [],
      surveyStateList: [],
      designStateList: [],
      decorationNatureLis: [],
      decorationSchedule: [],
      decorationStepsList: [],
      decorationStateList: [],
      displayScheduleList: [],
      dispalyStepsList: [],
      openScheduleList: [],
      businessStatusList: [],
      isFinishMappingList: [
        { dictCode: 0, dictName: '未测绘' },
        { dictCode: 1, dictName: '已测绘' }
      ]
    }
  },
  computed: {},
  created() {
    this.formData.id = this.detailData.id
    queryDetailData(this.formData.id).then(res => {
      if (res.success) {
        this.formData = res.data
        if (this.formData.designState === 'E') {
          this.formData.isDesignEnd = 1
        } else {
          this.formData.isDesignEnd = 0
        }
        if (this.formData.isOpen) {
          this.formData.openState = '已开业'
        } else {
          this.formData.openState = '未开业'
        }
      }
    })
    this.getDictByPatchTypeAll(['BEFORE_CONST_SCHEDULE', 'BELONG_STAGE', 'CONST_STATE', 'CONST_TYPE', 'SHOP_TYPE',
      'BIZ_TYPE', 'CITY_LEVEL', 'MARKET_LEVEL', 'MARKET_TYPE', 'BIZMAN_TYPE', 'DECORATION_FORM', 'DECORATION_RANGE',
      'SHOP_CONSTRUCT_SOURC', 'SHOP_SURVEY_STATE', 'SHOP_DESIGN_STATE', 'DECORATION_NATURE', 'DECORATION_SCHEDULE',
      'SHOP_DECORATION_STEPS', 'SHOP_DECORATION_STATE', 'SHOP_SOFTWEAR_DISPLAY_SCHEDULE', 'SHOP_SOFTWEAR_DISPLAY_STEPS',
      'SHOP_CONSTRUCT_SOURCE', 'DECORATION_DATA_FROM', 'OPEN_SCHEDULE', 'SHOP_BIZ_STATE'])
      .then(res => {
        this.constScheduleList = res.BEFORE_CONST_SCHEDULE // 门店建设整体进度
        this.belongStageList = res.BELONG_STAGE // 门店建设整体进度
        this.constStateList = res.CONST_STATE // 门店建设状态
        this.constTypeList = res.CONST_TYPE // 门店建设类型
        this.shopTypeList = res.SHOP_TYPE // 门店类型
        this.bizTypeList = res.BIZ_TYPE // 门店业务类型
        this.cityLevelList = res.CITY_LEVEL // 城市级别
        this.marketLevelList = res.MARKET_LEVEL // 市场层级
        this.marketTypeList = res.MARKET_TYPE // 报图类型
        this.bizmanTypeList = res.BIZMAN_TYPE // 商家类别
        this.decorationFormList = res.DECORATION_FORM // 装修形式
        this.decorationRangeList = res.DECORATION_RANGE // 装修范围
        this.dataFormList = res.SHOP_CONSTRUCT_SOURCE // 数据来源
        this.dataFormList1 = res.DECORATION_DATA_FROM // 装修任务来源
        this.surveyStateList = res.SHOP_SURVEY_STATE // 门店测绘进度
        this.designStateList = res.SHOP_DESIGN_STATE // 门店设计进度
        this.decorationNatureList = res.DECORATION_NATURE // 装修性质
        this.decorationSchedule = res.DECORATION_SCHEDULE // 装修进度
        this.decorationStepsList = res.SHOP_DECORATION_STEPS // 装修步骤
        this.decorationStateList = res.SHOP_DECORATION_STATE // 装修状态
        this.displayScheduleList = res.SHOP_SOFTWEAR_DISPLAY_SCHEDULE // 软装陈列进度
        this.dispalyStepsList = res.SHOP_SOFTWEAR_DISPLAY_STEPS // 软装陈列步骤
        this.openScheduleList = res.OPEN_SCHEDULE // 软装陈列步骤
        this.businessStatusList = res.SHOP_BIZ_STATE // 门店营业状态
      })
  },
  activated() {},
  methods: {
    async getDictByPatchTypeAll(data) {
      const obj = await getDictByPatchType(data)
        .then(res => {
          return res
        })
      return obj
    },
    // 格式化数据
    formaterData(arr, dictCode) {
      if (!arr) return
      const tmpArr = arr.filter(item => item.dictCode === dictCode)
      if (tmpArr.length) {
        return tmpArr[0].dictName
      }
      return dictCode
    },
    formaterArr(data, str) {
      if (!data || !data.length || !str || !str.length) return
      let list = []
      if (typeof (str) === 'string') {
        list = str.split(',')
      } else {
        list = str
      }
      const arr = []
      data.forEach((item) => {
        const flag = list.some(v => v === item.dictCode)
        if (flag) {
          arr.push(item.dictName)
        }
      })
      return arr.toString()
    },
    booleansFormatter(data) {
      if (data === 1) {
        return '是'
      } else if (data === 0) {
        return '否'
      }
    },
    // 查看选址评估详情
    toLocationApply() {
      if (!this.formData.locationEvalId) return
      this.locationId = this.formData.locationEvalId
      this.showLocationDetail = true
      this.$emit('checkOtherDetail', this.showLocationDetail)
    },
    // 查看门店测绘详情
    toSurveyDetail() {
      if (!this.formData.surveyId) return
      this.surveyId = this.formData.surveyId
      this.showSurveyDetail = true
      this.$emit('checkOtherDetail', this.showSurveyDetail)
    },
    // 查看门店设计详情
    toDesignDetail() {
      if (!this.formData.designId) return
      this.designId = this.formData.designId
      this.showDesignDetail = true
      this.$emit('checkOtherDetail', this.showDesignDetail)
    },
    // // 查看软装陈列记录
    // toSoftwearList() {
    //   const obj = {
    //     // type: 'unitEdit',
    //     constCode: this.formData.constCode
    //   }
    //   const path = '/softDecorate'
    //   const query = obj
    //   const pageName = '门店软装陈列管理'
    //   const menuCode = 'PC0039728'
    //   openPage(path, query, pageName, menuCode)
    // },
    // // 查看开业记录
    // toOpenList() {
    //   const obj = {
    //     // type: 'unitEdit',
    //     constCode: this.formData.constCode
    //   }
    //   const path = '/openManage'
    //   const query = obj
    //   const pageName = '门店开业管理'
    //   const menuCode = 'PC6311727'
    //   openPage(path, query, pageName, menuCode)
    // },
    backDetail(value) {
      this.showLocationDetail = value
      this.showSurveyDetail = value
      this.showDesignDetail = value
      this.$emit('checkOtherDetail', this.showLocationDetail)
    }
  }
}
</script>

<style lang="less" scoped>

</style>
